<script setup lang="ts">
import { useMemberStore } from '@/stores'

const memberStore = useMemberStore()
</script>

<template>
  <view class="my">
    <view>个人信息：</view>
    <template v-for="(item, index) in memberStore.profile" :key="index">
      <view>{{ item }}</view>
    </template>
    <button
      @tap="
        memberStore.setProfile({
          id: 1,
          nickname: '张三',
          age: 13,
          phone: '17868963942'
        })
      "
      size="mini"
      plain
      type="primary"
    >
      保存用户信息
    </button>
    <button @tap="memberStore.clearProfile()" size="mini" plain type="warn">清理用户信息</button>
  </view>
</template>

<style lang="scss">
//
</style>
